
//
//  SampuxGetListValue.m
//  Sampux
//
//  Created by rzm on 16/9/2.
//  Copyright © 2016年 rzm. All rights reserved.
//

#import "SampuxGetListValue.h"
#import "SampuxListModel.h"


@interface SampuxGetListValue ()
@property (nonatomic, strong) SampuxListModel *model;

@end
@implementation SampuxGetListValue

+ (NSMutableArray *)getListData:(NSMutableArray *)tempArr
{
    NSMutableArray *tempDataArr = [NSMutableArray array];
        for (int i = 0; i < tempArr.count; i ++)
        {
            GBInterMaster_Bean_DeviceInfo13001* bean = tempArr[i];
           SampuxListModel *_model = [SampuxListModel alloc];
            _model.nameStr = bean.alias;
            _model.accountStr = bean.account;
            _model.isOnLine = bean.isOnLine;
            _model.isDataSyn = bean.isDataSyn;
            _model.workMode = bean.workMode;
            _model.heatMode = bean.heatMode;
//            _model.workModeSetTime = bean.workModeSetTime;
//            _model.heatModeSetTime = bean.heatModeSetTime;
            _model.powerSwitch = bean.powerSwitch;
//            _model.powerSwitchSetTime = bean.powerSwitchSetTime;
            _model.currentSetTempe = bean.currentSetTempe;
//            _model.currentSetTempeSetTime = bean.currentSetTempeSetTime;
            _model.currentRoomTempe = bean.currentRoomTempe;
            _model.currentRoomHumidity = bean.currentRoomHumidity;
            _model.isHeat = bean.isHeat;
            _model.tempSetLimitTop = bean.tempSetLimitTop;
            _model.tempSetLimitLown = bean.tempSetLimitLown;
            _model.actionTotalTime = bean.actionTotalTime;
            _model.isSiliconControlProtection = bean.isSiliconControlProtection;
            _model.isOverTempProtection = bean.isOverTempProtection;
            _model.isColdTempProtection = bean.isColdTempProtection;
            _model.pragramCurrentPoint = bean.pragramCurrentPoint;
            _model.QKHSetTemp = bean.QKHSetTemp;
            _model.CFTSetTemp = bean.CFTSetTemp;
            _model.ECSetTemp = bean.ECSetTemp;
            _model.ProgramSetTemp = bean.ProgramSetTemp;
            _model.nameStr = bean.alias;
            _model.isPossessor = bean.isPossessor;
            _model.userAccount = bean.userAccount;
            _model.ownAccount = bean.ownAccount;
            if (bean.powerSwitch == 1) {
                _model.isShutDownOrNot = NO;
            }else
            {
                _model.isShutDownOrNot = YES;
            }
            if (bean.workMode == 0) {
                _model.isTimeMode = YES;
            }else
            {
                _model.isTimeMode = NO;
            }
            [tempDataArr addObject:_model];
        }
    return tempDataArr;
}

+ (SampuxListModel *)beanChangeToModel:(GBInterMaster_Bean_DeviceInfo13001 *)bean
{
        SampuxListModel *_model = [SampuxListModel alloc];
//        _model.nameStr = bean.alias;
        _model.accountStr = bean.account;
        _model.isOnLine = bean.isOnLine;
        _model.isDataSyn = bean.isDataSyn;
        _model.workMode = bean.workMode;
        _model.heatMode = bean.heatMode;
//        _model.workModeSetTime = bean.workModeSetTime;
//        _model.heatModeSetTime = bean.heatModeSetTime;
        _model.powerSwitch = bean.powerSwitch;
//        _model.powerSwitchSetTime = bean.powerSwitchSetTime;
        _model.currentSetTempe = bean.currentSetTempe;
//        _model.currentSetTempeSetTime = bean.currentSetTempeSetTime;
        _model.currentRoomTempe = bean.currentRoomTempe;
        _model.currentRoomHumidity = bean.currentRoomHumidity;
        _model.isHeat = bean.isHeat;
        _model.tempSetLimitTop = bean.tempSetLimitTop;
        _model.tempSetLimitLown = bean.tempSetLimitLown;
        _model.actionTotalTime = bean.actionTotalTime;
        _model.isSiliconControlProtection = bean.isSiliconControlProtection;
        _model.isOverTempProtection = bean.isOverTempProtection;
        _model.isColdTempProtection = bean.isColdTempProtection;
        _model.pragramCurrentPoint = bean.pragramCurrentPoint;
        _model.QKHSetTemp = bean.QKHSetTemp;
        _model.CFTSetTemp = bean.CFTSetTemp;
        _model.ECSetTemp = bean.ECSetTemp;
        _model.ProgramSetTemp = bean.ProgramSetTemp;
        _model.nameStr = bean.alias;
        _model.isPossessor = bean.isPossessor;
        _model.userAccount = bean.userAccount;
        _model.ownAccount = bean.ownAccount;
        if (bean.powerSwitch == 1) {
            _model.isShutDownOrNot = NO;
        }else
        {
            _model.isShutDownOrNot = YES;
        }
        if (bean.workMode == 0) {
            _model.isTimeMode = YES;
        }else
        {
            _model.isTimeMode = NO;
        }
    return _model;
}


@end
